# -*- coding: utf-8 -*-

from osv import fields,osv
from osv.orm import browse_record
import tools
from functools import partial
import pytz
import pooler
from tools.translate import _
from service import security
import netsvc
import datetime

class aas_news_send_emails(osv.TransientModel):
    _name = 'aas.news.send.emails'
    _columns = {
        'name': fields.char('/', size=64),
    }
    _defaults = {
        'name': lambda *a: '/',
    }
    
    def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
        news_obj = self.pool.get('aas.news')
        news_obj.send_news_notification_emails(cr, uid, context=context)
        result = super(aas_news_send_emails, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
        return result
    
aas_news_send_emails()

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
